package com.gugee.ins.common.model.spider.app.media;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.gugee.ins.common.model.spider.app.InsAppBloggerNode;
import com.gugee.ins.common.model.spider.app.InsAppImageVersion;
import com.gugee.ins.common.model.spider.app.product.InsAppProductTag;
import lombok.Data;

import java.util.List;

/**
 *
 * @author Huangxin
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class InsAppMediaBody {

    @JsonProperty("id")
    private String mid;

    @JsonProperty("code")
    private String shortcode;

    @JsonProperty("media_type")
    private int mediaType;

    @JsonProperty("view_count")
    private long videoViewCount;

    @JsonProperty("play_count")
    private long videoPlayCount;

    @JsonProperty("video_duration")
    private double videoDuration;

    @JsonProperty("image_versions2")
    private InsAppImageVersion imageVersions;

    @JsonProperty("video_versions")
    private List<InsAppMediaVideoVersion> videoVersions;

    private InsAppMediaCaption caption;

    private EdgeMediaTaggedUser usertags;

    @JsonProperty("comment_count")
    private Integer commentCount;

    @JsonProperty("sponsor_tags")
    private List<InsAppMediaSponsorBody> sponsorTags;

    @JsonProperty("comments_disabled")
    private boolean commentsDisabled;

    @JsonProperty("taken_at")
    private long takenTime;

    @JsonProperty("like_count")
    private Long likeCount;

    @JsonProperty("carousel_media")
    private List<InsAppCarouselMedia> carouselMedia;

    private InsAppBloggerNode user;

    private InsAppMediaLocation location;

    @JsonProperty("product_type")
    private String productType;

    @JsonProperty("product_tags")
    private ProductTags productTags;

    private Double er;

    /**
     *
     * @author Huangxin
     */
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class EdgeMediaTaggedUser {
        private List<InsAppMediaTaggedBody> in;
    }

    /**
     *
     * @author Huangxin
     */
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class ProductTags {
        private List<InsAppProductTag> in;
    }
}
